#pragma once
#include "Pascal.h"

typedef procedure THandlerCallback;

void wc3main_Init();
void wc3main_initialization();
void wc3main_finalization();

//HMODULE GameDll;

struct tList
{
	THandlerCallback *pElement;
	tList *pNext_Element;
	tList *pForerunner_Element;
	int vN_Element;
};

class THandlerCallbacks
{
private:
	tList *pFirstElement;
	tList *pCurrentElement;
	tList *pLastElement;
	int vQ_Elements;
public:
	static THandlerCallbacks * Create();
	void Destroy();
	void Add(THandlerCallback * ACallback);
	THandlerCallback * GetFirstElement();
	THandlerCallback * GetNextElement();
	THandlerCallbacks();
};

//THandlerCallbacks * InitHandlers;
//THandlerCallbacks * InitDoneHandlers;

procedure wc3main_SubscribeOnInit(THandlerCallback * ACallback);
procedure wc3main_SubscribeOnInitDone(THandlerCallback * ACallback);
procedure wc3main_Init(HMODULE AGameDll);